package com.itheima.idea;

public class Test2Arry {
    public static void main(String[] args) {
        int[] arr = {-12,-45,-98,-73,-60};
        //先假设数组中第一元素为最大值.
        int max = arr[0];
        for(int i = 1; i < arr.length; i++){
            if(arr[i] > max){
                max = arr[i];
            }
        }
        System.out.println("max:" + max);
    }
}
